package com.lagou.es.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "lagou",type = "product",shards = 3,replicas = 3)
@AllArgsConstructor
public class Product {

    @Id //作为document的id
    private Long id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String name; //名称

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String goodsdesc;// 分类

    @Field(type = FieldType.Double)
    private Double price; // 价格


}
